<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC
  "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Example 3</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style type="text/css">
      div {
        margin: 1em;
        padding: 5px;
        border: 1px solid #ddd;
      }
      .woot{
        color: #f00;
      }
      #third-div {
        height: 3em;
      }
    </style>
    <script type="text/javascript" src="wootquery.js"></script>
    <script type="text/javascript">
      // jQuery Input:
      $(document).ready(function(){
        $("li").hover(
          function () {
            $(this).append("<span class='woot'> Double-click me to make me disappear forever!</span>");
          },
          function () {
            $(this).find("span:last").remove();
          }
        );
        $("li").dblclick(function(){
           $(this).remove();
        });          
        $("#p1").click(function(){
           $(this).html("Saung: \"I'm cool!\"");
           $('#p2').html("Karl: \"And I'm not :(\"");
        });
        $("#p2").click(function(){
           $(this).html("Karl: \"I'm cool now!\"");
           $('#p1').html("Saung: \"Now I'm not :(\"");
        });
        $("#p1").hover(
          function(){
              $(this).append("<span class='woot'> Click me to make Saung cool and Karl not!</span>");
          },
          function(){
              $(this).find("span:last").remove();
          }
        );
        $("#p2").hover(
          function(){
              $(this).append("<span class='woot'> Click me to make Karl cool and Saung not!</span>");
          },
          function(){
              $(this).find("span:last").remove();
          }
        );
        p3 = $("#p3");
        $("#third-div").hover(
          function(){
              $(this).html("");
          },
          function(){
              $(this).append(p3);
          }
        );
      });
        
    </script>
  </head>
  <body>
    <h1>Welcome to the Show</h1>
    <p> Hover over the text below to see what you can do!</p>
    <div id="first-div">
      <p id="p1"> Saung: "Welcome!" </p>
      <p id="p2"> Karl: "Welcome!" </p>
    </div>
    <div id="second-div">
      <ul>
        <li>List element 1</li>
        <li>List element 2</li>
        <li>List element THREE</li>
      </ul>
    </div>
    <div id="third-div">
        <p id="p3">Hover over me to make me fade away! </p>
    </div>
  </body>
</html>